From Optional to Gradual Typing via Transient Checks
نویسندگان
چکیده
Gradual typing [11, 16] has seen widespread use over the last several years, in both academic research [1, 2, 9, 10, 12–14] and industrial language design [5, 6, 8]. Many recent implementations of gradual typing are translations to an existing untyped target language. Some of these translation do not perform runtime checking, which is needed for gradual soundness, in part because of the complexity of implementing sound proxy-based casts in the target language of the translation. These languages, which we refer to as optionally-typed [4], instead perform static typechecking and then erase types for execution, without guarding the boundaries of statically-checked and dynamically typed regions of code. The transient approach to gradual typing [17], which inserts lightweight checks to ensure soundness, provides a straightforward way to implement sound gradual typing for this class of languages. In this abstract we report on our experience in adapting the transient approach, originally designed for Python, to implement sound gradual typing for TypeScript [8].
منابع مشابه
Gradual Typing in an Open World
Gradual typing combines static and dynamic typing in the same language, offering the benefits of both to programmers. Static typing provides error detection and strong guarantees while dynamic typing enables rapid prototyping and flexible programming idioms. For programmers to take full advantage of a gradual type system, however, they must be able to trust their type annotations, and so runtim...
متن کاملGradual Typing with Efficient Object Casts
Gradual type systems meld dynamic typing with optional static types, moderating between the two with statically inserted casts. Casting is the éminence grise of such systems — it enables swift detection of type errors in dynamic code without enforcing runtime checks throughout a program, and in combination with blame tracking it allows such errors to be traced to their origin. However, such cas...
متن کاملGradual Typing for Functional Languages
Static and dynamic type systems have well-known strengths and weaknesses, and each is better suited for different programming tasks. There have been many efforts to integrate static and dynamic typing and thereby combine the benefits of both typing disciplines in the same language. The flexibility of static typing can be improved by adding a type Dynamic and a typecase form. The safety and perf...
متن کاملPractical Optional Types for Clojure
Typed Clojure is an optional type system for Clojure, a dynamic language in the Lisp family that targets the JVM. Typed Clojure’s type system build on the design of Typed Racket, repurposing in particular occurrence typing, an approach to statically reasoning about predicate tests. However, in adapting the type system to Clojure, changes and extensions are required to accommodate additional lan...
متن کاملPosition Paper: Performance Evaluation for Gradual Typing
Gradually typed programming languages aim to improve software maintenance by allowing programmers to selectively add type annotations to untyped programs. Run-time checks ensure that these typed portions interact soundly with unannotated parts of the program. These checks, however, may introduce unacceptable performance overhead. The extent of the overhead has not been systematically studied an...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2016